# -*- coding: utf-8 -*-
import sys
from comment.utils import const

'''
phone_numbers :发送短信的目标手机号码
'''
def send_sms(phone_numbers,code):
    # 生成一个6位数的随机数
    print(f"生成的验证码: {code}")  # 添加调试信息

    # 模拟发送验证码
    try:
        # 模拟发送成功
        print(f"验证码已发送到手机号: {str(phone_numbers)}")
        return {'code': str(code)}
    except Exception as e:
        print(f"发送验证码时发生错误: {e}")  # 添加异常处理
        return None

# if __name__ == '__main__':
#     phone_number = "13096132378"
#     code = send_sms(phone_number)
#     if code:
#         print(f"验证码为: {code}")
#     else:
#         print("生成验证码失败")
